package cn.tom.basic.util;

/**
 * 工具类：获取当前登录人的工具
 */
public class LoginContextUtils {

  /*  public static Logininfo getLogininfo(HttpServletRequest request){
        String jwtToken = request.getHeader("token");
        if(jwtToken!=null){
            try {
                PublicKey publicKey = RsaUtils.getPublicKey(JwtUtils.class.getClassLoader().getResource("auth_rsa.pub").getFile());
                Payload<LoginData> payload = JwtUtils.getInfoFromToken(jwtToken, publicKey, LoginData.class);
                return payload.getLoginData().getLogininfo();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return null;
    }*/
}
